package com.heima.admin.controller;

import com.heima.api.auth.IAuthClient;
import com.heima.model.admin.dtos.AuthDto;
import com.heima.model.common.dtos.ResponseResult;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RestController
@RequiredArgsConstructor
@RequestMapping("/api/v1/auth")
public class ApUserRealnameController {


    private final IAuthClient authClient;

    /**
     * 用户审核列表查询
     * @param authDto
     * @return
     */
    @PostMapping("/list")
    public ResponseResult list(@RequestBody AuthDto authDto){
        return authClient.list(authDto);
    }
    /**
     * 用户审核失败
     * @param authDto
     * @return
     */
    @PostMapping("/authFail")
    public ResponseResult fail(@RequestBody AuthDto authDto){
        return authClient.fail(authDto);
    }
    /**
     * 用户审核成功
     * @param authDto
     * @return
     */
    @PostMapping("/authPass")
    ResponseResult pass(@RequestBody AuthDto authDto){
        return authClient.pass(authDto);
    }
}
